import request from '@/utils/request'

/* 获取楼宇列表接口 */
export const fetchBuildingListAPI = (params) => {
  return request({
    url: '/park/building',
    method: 'GET',
    params
  })
}

/* 添加楼宇的接口 */
export const addBuildingAPI = (data) => {
  return request({
    url: '/park/building',
    method: 'POST',
    data
  })
}

/* 编辑楼宇的接口 */
export const editBuildingAPI = (data) => {
  return request({
    url: '/park/building',
    method: 'PUT',
    data
  })
}

/* 查询楼宇的接口 */
export const findBuildingAPI = (id) => {
  return request({
    url: `/park/building/${id}`,
    method: 'GET'
  })
}

/* 删除楼宇的接口 */
export const deleteBuildingAPI = (id) => {
  return request({
    url: `/park/building/${id}`,
    method: 'DELETE'
  })
}
